<br /><br />
<div style="text-align:center;">
    <table style="margin-left:auto;margin-right:auto;">
        <tr>
            <td style="background-color: #CCCCCC; padding: 10px;">
            <div class="wrap5">
            {if !$bUseLightbox}
            {img max_width="600" src="`$sActualImage`" alt="" src_def="design/pic/noimage_120.jpg"}
            {else}
            {if $iWidth > 500 || $iHeight > 500}
            {img rel="lytebox" onclick="startLytebox('mainimage');" max_width="600" src="`$sActualImage`" src_def="design/pic/noimage_120.jpg" alt="" id="mainimage"}
            {else}
            {img max_width="600" src="`$sActualImage`" src_def="design/pic/noimage_120.jpg" alt=""}
            {/if}
            {/if}
                 </div>
            </td>
        </tr>
    </table> 
</div>
<br />
<div style="text-align:center;">
    {if isStaff()}
    	<div style="padding:5px;">
    		<a class="link_action" href="{url link="public.user.gallery.name_`$sUser`" delete=$aItem.id}" onclick="sure('');">[ {language text='delete'} ]</a>
    		{if $aItem.feature == 1}<a class="link_action" href="{url link='current' removefeature=$aItem.id}">[ {language text="unmake_featured"} ]</a>{else}<a class="link_action" href="{url link='current' makefeature=$aItem.id}">[ {language text="make_featured_763"} ]</a>{/if}	    	
    	</div>
    {/if}
	{$aItem.text|process_code}
</div>
<br /><br />
<div style="text-align:center;font-size:9pt;" class="color">
 	{if $iPrevId}<a href="{url link='public.user.gallery.view' name=$aItem.user id=$iPrevId}">&lt;&lt; {language text="prev_pic"}</a> | {/if}
 	<a href="{url link='public.user.gallery' name=$aItem.user}">{language text="main_gallery"}</a>
 	{if $iNextId}| <a href="{url link='public.user.gallery.view' name=$aItem.user id=$iNextId}">{language text="next_pic"} &gt;&gt;</a>{/if}
</div>
<br />
<br />


<table style="width:100%;" border="0" cellspacing="0" cellpadding="0">
<tr>
	<td style="width:10%;"></td>
    <td style="width:80%;font-size:8pt;vertical-align:middle;font-size:8pt;" class="color">
    {bookmarks}
    <br />
    {Comments::AddForm type='gallery' alert_id=$aItem.user_id}
    <br />
    <a name="comment"></a>
    <div id="new_comment" style="display:none;"></div>
    	{Comments::List type='gallery' totalCount=$aItem.comment}
	</td>
    <td style="width:10%;"></td>
</tr>
</table>